package com.ktwlsoft.archivemanage.domain.business.repositoryService.register;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.register.IAccountRegisterMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.register.AccountRegister;

/**
 * account_register--账号注册业务层接口实现类
 *
 * @author zhuhe on 2020-07-09 10:41:39
 * @version 1.0
 */
@Service
public class AccountRegisterService {
	
	@Autowired
	private IAccountRegisterMapper accountRegisterMapper;

    /**
 	 * 查询分页 on 2020-07-09 10:41:39
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param accountRegister accountRegister
 	 * @return PageInfo<AccountRegister>
 	 */
	public PageInfo<AccountRegister> findPage(int pn,int pageSize,AccountRegister accountRegister) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<AccountRegister> pageInfo = new PageInfo<AccountRegister>(accountRegisterMapper.findList(accountRegister));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-07-09 10:41:39
	 * @param accountRegister accountRegister
	 * @return List<AccountRegister>
	 */
	public List<AccountRegister> findList(AccountRegister accountRegister) {
		return accountRegisterMapper.findList(accountRegister);
	}

    /**
	 * 根据ID查询信息 on 2020-07-09 10:41:39
	 * @param id	主键
	 * @return AccountRegister
	 */
	public AccountRegister getById(Long id){
		return accountRegisterMapper.getById(id);
	}

   /**
	 * 新增 on 2020-07-09 10:41:39
	 * @param accountRegister accountRegister
	 * @return int
	 */
	public int insert(AccountRegister accountRegister){
		return accountRegisterMapper.insert(accountRegister);
	}

	/**
	 * 批量插入 2020-07-09 10:41:39
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<AccountRegister> list){
	    return accountRegisterMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-07-09 10:41:39
	 * @param accountRegister accountRegister
	 * @return int
	 */
	public int update(AccountRegister accountRegister){
		return accountRegisterMapper.update(accountRegister);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-07-09 10:41:39
	 * @param accountRegisterArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> accountRegisterArr){
		return accountRegisterMapper.deleteByIds(accountRegisterArr);
	}

   /**
	 * 根据id删除信息 on 2020-07-09 10:41:39
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return accountRegisterMapper.deleteById(id);
	}

	/**
	 * 审核分页 on 2020-07-09 10:41:39
	 * @param pn 第几页
	 * @param pageSize 每页多少条
	 * @param object object
	 * @return PageInfo<AccountRegister>
	 */
	public PageInfo<AccountRegister> examinePage(int pn,int pageSize,JSONObject object) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<AccountRegister> pageInfo = new PageInfo<AccountRegister>(accountRegisterMapper.examinePage(object));
		return pageInfo;
	}
}
